// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0.

@import "../../common/variables";
@import "../card/card-variables";

$navbar-padding: $pt-spacing * 4 !default;

$navbar-background-color: $card-background-color !default;
$dark-navbar-background-color: $dark-card-background-color !default;

.#{$ns}-navbar {
  background-color: $navbar-background-color;
  box-shadow: $pt-elevation-shadow-1;
  height: $pt-navbar-height;
  padding: 0 $navbar-padding;
  position: relative;
  width: 100%;
  z-index: $pt-z-index-content;

  &.#{$ns}-dark,
  .#{$ns}-dark & {
    background-color: $dark-navbar-background-color;
  }

  // shadow for dark navbar in light theme apps
  &.#{$ns}-dark {
    box-shadow: inset $pt-dark-elevation-shadow-1;
  }

  // shadow for dark navbar in dark theme apps
  .#{$ns}-dark & {
    box-shadow: $pt-dark-elevation-shadow-1;
  }

  &.#{$ns}-fixed-top {
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
  }

  @media (forced-colors: active) and (prefers-color-scheme: dark) {
    border: 1px solid $pt-high-contrast-mode-border-color;
  }
}

.#{$ns}-navbar-heading {
  font-size: $pt-font-size-large;
  margin-right: $navbar-padding;
}

.#{$ns}-navbar-group {
  align-items: center;
  display: flex;
  height: $pt-navbar-height;

  &.#{$ns}-align-left {
    float: left;
  }

  &.#{$ns}-align-right {
    float: right;
  }
}

.#{$ns}-navbar-divider {
  border-left: 1px solid $pt-divider-black;
  height: $pt-navbar-height - $pt-spacing * 7.5;
  margin: 0 ($pt-spacing * 2);

  .#{$ns}-dark & {
    border-left-color: $pt-dark-divider-white;
  }
}
